---
id: 6568997f94c673a68b035b60
title: Passo 14
challengeType: 20
dashedName: step-14
---

# --description--

Now, you would join the elements of the segment (`part`) with the pipe character (`|`).

For that, first, use a `for` loop `for item in part` to access all elements.

Then, use the `join()` method on the `|` character to join the elements of the segment (`part`).

After that, convert each element to a string using `str(item)`.

# --hints--

You should use the `join()` method on the `|` character to join the elements of the segment (`part`). add test for "" as well

```js
assert.match(code, /('|")\|\1\.join\s*\(/)
```

You should call `str()` on each element in `part` using a generator expression.

```js
({ test: () => assert.match(code, /\(\s*str\s*\(\s*(\w+)\s*\)\s+for\s+\1\s+in\s+part\s*\)/) })
```

You should have `'|'.join(str(item) for item in part)` within the inner `for` loop.

```js
({ test: () => assert.match(code, /("|')\|\1\.join\s*\(\s*str\s*\(\s*(\w+)\s*\)\s+for\s+\2\s+in\s+part\s*\)/m) })
```

# --seed--

## --seed-contents--

```py
class Board:
    def __init__(self, board):
        self.board = board

    def __str__(self):
        upper_lines = f'\n╔═══{"╤═══"*2}{"╦═══"}{"╤═══"*2}{"╦═══"}{"╤═══"*2}╗\n'
        middle_lines = f'╟───{"┼───"*2}{"╫───"}{"┼───"*2}{"╫───"}{"┼───"*2}╢\n'
        lower_lines = f'╚═══{"╧═══"*2}{"╩═══"}{"╧═══"*2}{"╩═══"}{"╧═══"*2}╝\n'
        board_string = upper_lines

        for index, line in enumerate(self.board):
            row_list = []
--fcc-editable-region--
            for square_no, part in enumerate([line[:3], line[3:6], line[6:]], start=1):

--fcc-editable-region--
```
